#include "cp.h"
#include <fcntl.h>

int main(int argc,char *argv[])
{
		
	//char *file_from_path = "/etc/passwd";
	char *file_from_path = "/etc/passwd";
	char *file_to_path = "/home/jin/passwd";
	int file_from = open(file_from_path,O_RDONLY);
	// O_CREAT 等几个常理需包含 fcntl.h 
	int file_to = open(file_to_path,O_CREAT | O_TRUNC | O_WRONLY,0777);
	copy(file_from,file_to);
	return 1;
	return 0;	
}
